﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;
using System.Windows.Markup;

namespace EasyFlow
{
    public class StepStatusConverter : MarkupExtension, IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            switch((StepStatus)value)
            {
                case StepStatus.Wait:
                    return "\xe600";
                case StepStatus.Alert:
                    return "\xe64b";
                case StepStatus.Running:
                    return "\xe601";
                case StepStatus.Error:
                    return "\xe626";
                case StepStatus.Finish:
                    return "\xe648";
                case StepStatus.Info:
                    return "\xe654";
            }
            return "";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        public override object ProvideValue(IServiceProvider serviceProvider)
        {
            return this;
        }
    }
}
